package com.zyg.manager.controller;

import com.zyg.common.utils.R;
import com.zyg.common.utils.UploadUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 类名：
 * 作者：LMY
 * 创建时间：2021/11/1-17:27
 * 功能:
 */
@RestController
@RequestMapping("/manager")
public class UploadController {


    @PostMapping("/upload")
    public R upload(@RequestBody MultipartFile file) throws Exception {

        return UploadUtils.upload(file);
    }



}
